package com.slz3.business.module.configManagement.conZoneManage.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conZoneManage.domain.ConZoneManage;
import com.slz3.business.module.configManagement.conZoneManage.domain.ConZoneManageCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class ConZoneManageResAtomic {

    public Mono<ServerResponse> add_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManage conZoneManage) {
        return ConZoneManageResSafeValid.add(req, conZoneManage) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.add(req, conZoneManage);
    }

    public Mono<ServerResponse> delete_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.delete(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManage conZoneManage) {
        return ConZoneManageResSafeValid.modify(req, conZoneManage) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.modify(req, conZoneManage);
    }

    public Mono<ServerResponse> info_$ConZoneManageUpdateLock(ServerRequest req) {
        return ConZoneManageResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.auditSubmit(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.audit(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.auditReject(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.usingEnable(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$ConZoneManageUpdateLock(ServerRequest req, ConZoneManageCondition conZoneManageCondition) {
        return ConZoneManageResSafeValid.usingDisable(req, conZoneManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConZoneManageResExecutor.usingDisable(req);
    }
}
